/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.qdu.service.impl;

import com.qdu.dao.CommentDao;
import com.qdu.dao.impl.CommentDaoImpl;
import com.qdu.entity.Comment;
import com.qdu.service.CommentService;
import java.util.List;

/**
 *
 * @author Ice
 */
public class CommentServiceImpl implements CommentService {

    CommentDao commentDao = new CommentDaoImpl();

    @Override
    public int addNewComment(Comment c) {
        return commentDao.addComment(c);
    }

    @Override
    public int updateExistComment(Comment c) {
        return commentDao.updateComment(c);
    }

    @Override
    public int deleteExistCommentByCid(int cid) {
        return commentDao.deleteComment(cid);
    }

    @Override
    public List<Object[]> findCommentBookListById(int id) {
        return commentDao.getCommentBookListById(id);
    }

    @Override
    public List<Object[]> findCommentMovieListById(int id) {
        return commentDao.getCommentMovieListById(id);
    }

    @Override
    public List<Object[]> findCommentListByMBId(String mbid) {
        return commentDao.getCommentListByMBId(mbid);
    }

}
